SRCS = \
	macros.c assert.c ctype_unicode.c meminfo.c ncpus.c uptime.c \
	qsort.c bsearch.c bitcount.c base64.c md5.c \
	memcmp.c swab.c strtoi.c time.c utime.c bytetostr.c \
	strset.c strncpy.c strcpyn.c strncat.c strxtrm.c strpac.c strxpac.c \
	strxapp.c strxcap.c strspn.c strcspn.c strrot.c strxncpy.c \
	strfnmat.c strxnfnmat.c strxnfnmat2.c strdel.c strxdel.c \
	strpbrk.c strrpbrk.c strtodn.c stristype.c strvec.c strcmpn.c \
	str_cat.c str_del.c \
	wcstomcs.c wcsntomcs.c mcstowcs.c mcsntowcs.c \
	open.c opentmp.c getcwd.c getpnm.c epoll.c readlink.c \
	thread.c mutex.c condition.c rwlock.c fio01.c fio02.c \
	sio_getc.c sio_putc.c sio_puts.c sio_putsx.c \
	sio_putsn.c sio_putsxn.c sio_pos.c sio_close.c \
	sleep.c stdcli.c array01.c array02.c list01.c \
	trimpath.c 
OUTS = $(SRCS:.c=.x)

CC = @CC@
CFLAGS = @CFLAGS@ -I@abs_top_builddir@
LDFLAGS = @LDFLAGS@ -L@abs_top_builddir@/xp/bas
LIBS = @LIBS@ -lxpbas

all: $(OUTS)

clean:
	rm -rf $(OUTS) *.o

.SUFFIXES: .c .x
.c.x:
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
